package com.czapl.tabs;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.g2d.NinePatch;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.scenes.scene2d.utils.NinePatchDrawable;
import com.czapl.api.ITower;
import com.czapl.api.ITower.ITowerFromMenuSelectionListener;
import com.czapl.api.IUnit;
import com.czapl.mygdxgame.ConstructableField;
import com.czapl.mygdxgame.MyGdxGame;

public class UIDefender extends CUI {
	
	//private CTab m_infoTab;
	
	/*private enum Tabs {
		BUILD,
		SETTINGS,
		INFO
	}*/
	public UIDefender(ITowerFromMenuSelectionListener listener) {
		//setSelectionListener(listener);
        table = new Table(MyGdxGame.skin);
        //table.setBackground("dialogDim");
        //table.debug();
        table.setFillParent(true);
        //table.left().top();
        //table.
        addTab(new BuildTab(listener), "Build");
        addTab(new SummaryTab(), "Summary");
        addTab(new SkillsTab(), "Skills");
         
        m_menu.row();
        spacers = new Table();
        spacers.add(topSpacer)
        	.expandY()
        	.top()
        	.left();
        spacers.row();
        spacers.add(bottomSpacer).expandY().bottom().left();
        //spacers.debug();
        
        table.add(spacers).size(Gdx.graphics.getWidth()-MENU_WIDTH, Gdx.graphics.getHeight()).expandY();
        table.add(m_menu).size(MENU_WIDTH, Gdx.graphics.getHeight()).expand().top().right();
        addActor(table);
        
	}

}
